home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 4
/
CDPD_IV.bin
/
e
/
mailinglists
/
amigae.0294feb.archive
/
000021_donews!crash!m….msus.edu!platt_Tue, 8 Feb 94 01:43:01 PST.msg
< prev
next >
Wrap
Internet Message Format
|
1994-05-26
|
4KB
Received: by bkhouse.cts.com (V1.17-beta/Amiga)
id <1r09@bkhouse.cts.com>; Tue, 8 Feb 94 01:43:01 PST
Received: from crash by donews.cts.com with uucp
(Smail3.1.28.1 #18) id m0pTeDS-0001o1C; Mon, 7 Feb 94 14:14 PST
Received: from mhd1.moorhead.msus.edu by crash.cts.com with smtp
(Smail3.1.28.1 #18) id m0pSjYj-0000MOC; Sat, 5 Feb 94 01:44 PST
Received: by mhd1.moorhead.msus.edu (5.65/DEC-Ultrix/4.3)
id AA02499; Sat, 5 Feb 1994 03:45:05 -0600
Message-Id: <9402050945.AA02499@mhd1.moorhead.msus.edu>
Date: Sat, 5 Feb 1994 03:45:05 -0600 (CST)
X-Mailer: ELM [version 2.4 PL20]
Content-Type: text
Content-Length: 3412
From: platt@mhd1.moorhead.msus.edu (Vincent Platt)
To: amigae@bkhouse.cts.com (amigae)
Subject: HELP!!! (With AppIcons)
I'm working on an AppIcon project, and I've run into what I think may be a
bug in E. I'm trying to read the appmessage.arglist[].name. According to
the RKM, the .name part is there, and according to E, it is not. Ok I can
handle that. I look up the appmessage structure in 'workbench/workbench'
and it says that appmessage.arglist is a LONG. So how the heck are you
supposed to read the names of the icons which are dropped on the AppIcon???
BTW - This is an attempted translation of the AppIcons prog on page 360 of
the Libaries RKM. The code I have so far follows (so far this code can
detect when the AppIcon is double clicked, when objects are dropped on it,
and how many. Now I just need to get the names of the icons which are
dropped on it!!
Thanks in advance for any help.
OPT OSVERSION=37
/* The following MODULE statements come from EPP. EPP came up with these
statements given the following PMODULE statements:
PMODULE 'eheaders:exec/types'
PMODULE 'eheaders:workbench/workbench'
PMODULE 'eheaders:workbench/startup'
PMODULE 'eheaders:exec/libraries'
*/
MODULE 'exec/types'
MODULE 'exec/nodes'
MODULE 'exec/lists'
MODULE 'exec/tasks'
MODULE 'graphics/gfx'
MODULE 'exec/ports'
MODULE 'exec/semaphores'
MODULE 'utility/hooks'
MODULE 'graphics/clip'
MODULE 'graphics/copper'
MODULE 'graphics/gfxnodes'
MODULE 'graphics/monitor'
MODULE 'hardware/custom'
MODULE 'graphics/view'
MODULE 'graphics/rastport'
MODULE 'graphics/layers'
MODULE 'utility/tagitem'
MODULE 'graphics/text'
MODULE 'exec/io'
MODULE 'devices/serial'
MODULE 'devices/inputevent'
MODULE 'intuition/intuition'
MODULE 'workbench/workbench'
MODULE 'dos/dos'
MODULE 'workbench/startup'
MODULE 'exec/libraries'
MODULE 'icon'
MODULE 'wb'
DEF dummy1:LONG
DEF dummy2:PTR TO LONG
DEF str[256]:STRING
DEF dropcount
DEF x
DEF dobj:PTR TO diskobject
DEF myport:PTR TO mp
DEF appcon:PTR TO appicon
DEF appmsg:PTR TO appmessage
PROC main()
IF (iconbase:=OpenLibrary('icon.library',37))
IF (workbenchbase:=OpenLibrary('workbench.library',37))
IF (dobj:=GetDefDiskObject(WBDISK))
dobj.type=NIL
IF (myport:=CreateMsgPort())
IF (appcon:=AddAppIconA(NIL,NIL,'TestAppIcon',myport,NIL,dobj,NIL))
dropcount:=0
WriteF('Drop files on the AppIcon.\n')
WriteF('Example exits after 3 drops.\n')
WHILE dropcount < 3
WaitPort(myport)
WHILE appmsg:=GetMsg(myport)
IF appmsg.numargs = 0
WriteF('User activated the AppIcon.\nA window here would be nice.\n')
ELSEIF appmsg.numargs>0
WriteF('User dropped \d icons on the AppIcon.\n',appmsg.numargs)
FOR x:= 0 TO appmsg.numargs-1
dummy1:=appmsg.arglist
dummy2:=dummy1[x]
StrCopy(str,dummy2,ALL)
WriteF('#\d name = \s\n',x+1,str)
ENDFOR
ENDIF
ReplyMsg(appmsg)
ENDWHILE
INC dropcount
ENDWHILE
RemoveAppIcon(appcon)
WHILE appmsg:=GetMsg(myport)
ReplyMsg(appmsg)
ENDWHILE
DeleteMsgPort(myport)
FreeDiskObject(dobj)
CloseLibrary(workbenchbase)
CloseLibrary(iconbase)
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDPROC